package com.gemme.gemme.login;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.alibaba.fastjson.JSON;
import com.gemme.gemme.BaseActivity;
import com.gemme.gemme.MainActivity;
import com.gemme.gemme.R;
import com.gemme.gemme.util.DpUtil;
import com.gemme.gemme.util.SPUtil;
import com.gemme.gemme.view.InterestView;
import com.gemme.gemme.view.MyButton;
import com.jaeger.library.StatusBarUtil;

import java.util.ArrayList;

//侧滑删除地址
public class TestTitleBarActivity extends Activity {
    TestTitleBarActivity act = this;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //透明状态栏
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        //透明导航栏
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_title_bar);
        initView();

    }

    private void initView() {
//        StatusBarUtil.setTransparent(this);
        ImageView iv = findViewById(R.id.iv);
        findViewById(R.id.bt_color).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                StatusBarUtil.setColor(act, getResources().getColor(R.color.red));
            }
        });
        findViewById(R.id.bt_touming).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                StatusBarUtil.setTranslucent(act, 50);
            }
        });


        findViewById(R.id.bt_quan_touming).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                StatusBarUtil.setTransparent(act);
            }
        });

        findViewById(R.id.bt_iv).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                StatusBarUtil.setTranslucentForImageView(act, 50, iv);
            }
        });
    }
}